import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/layout'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: Layout,
      redirect: '/home',
      children: [
        {
          path: 'home',
          component: Layout,
          component: () => import("@/views/index"),
          name: "Home",
          meta: { title: '主页' }
        },
        {
          path: '/net/:id(\\d+)',
          component: Layout,
          component: () => import("@/views/net/index"),
          name: "Net",
          meta: { title: "Net" }
        }
      ]
    }
  ]
})
